package com.smartfactory.sail.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.smartfactory.sail.dto.GetItemAndMaterialSizeDto;
import com.smartfactory.sail.entity.Purchase;
import com.smartfactory.sail.vo.purchase.ListPurchaseResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 采购单表 Mapper 接口
 * </p>
 *
 * @author 王巨壁
 * @since 2019-08-20
 */
@Mapper
public interface PurchaseMapper extends BaseMapper<Purchase> {

    IPage<ListPurchaseResp> getListByPage(IPage<ListPurchaseResp> page, @Param("ew") Wrapper<ListPurchaseResp> queryWrapper);

    List<GetItemAndMaterialSizeDto> getItemAndMaterialSize(@Param("orderId") Long orderId);

}
